/*package com.adams.utils;

import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

import javax.sound.sampled.AudioFileFormat;
import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.UnsupportedAudioFileException;

import org.apache.log4j.Logger;

*//**
 * 
 * File Name : AudioUtil.java
 * 
 * @Description : 音频工具类
 * @author 904370 张汉辉
 *//*
public class AudioUtil
{
	private static Logger logger = Logger.getLogger(PinyinUtil.class.getName());

	*//**
	 * Description : 得到音频文件信息
	 * 
	 * @param audioFile
	 * @return
	 * 
	 *//*
	@SuppressWarnings("unchecked")
	public static Map getAudioInfoByFile(String path )
	{
		File  audioFile = new File(path);
		Map result = new HashMap();
		if (null == audioFile || !audioFile.exists())
		{
			return null;
		}
		try
		{
			AudioFileFormat aff = AudioSystem.getAudioFileFormat(audioFile);
			result = aff.properties();
		} catch (UnsupportedAudioFileException e)
		{
			String filename = audioFile.getName();
			logger.error("file name is:" + filename, e);
		} catch (IOException e)
		{
			logger.error(e);
		}
		return result;
	}
	
	*//**
	 * Description : 得到音频文件持续时间
	 * 
	 * @param audioFile
	 * @return second
	 * 
	 *//*
	@SuppressWarnings("unchecked")
	public static long getAudioTimeByFile(String path){
		long total = 0;
		Map info = getAudioInfoByFile(path);
		if (info!=null && info.containsKey("duration")){
			 total  = (long) Math.round((((Long) info.get("duration"))
						.longValue()) / (1000*1000));
		}
		return total;
	}
	
	*//**
	 * Description : 得到音频文件位速
	 * 
	 * @param audioFile
	 * @return second
	 * 
	 *//*
	@SuppressWarnings("unchecked")
	public static int getAudioHZByFile(String path){
		int total = 0;
		Map info = getAudioInfoByFile(path);
		if (info!=null && info.containsKey("mp3.bitrate.nominal.bps")){
			 total  = ((Integer)info.get("mp3.bitrate.nominal.bps")).intValue()/1000;
		}
		return total;
	}
	
	
	public static void main(String[] args) throws Exception
	{
	}
}
*/